perm filename DVIESP.ALS[UP,DOC]1 blob
sn#797404 filedate 1985-06-25 generic text, type C, neo UTF8
COMMENT ā VALID 00003 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 Using DVIESP to print DVI files on the third floor IMAGEN
C00006 00003 Some \special commands in DVI files that DVIESP understands
C00017 ENDMK
Cā;
Using DVIESP to print DVI files on the third floor IMAGEN
The DVIESP program converts a DVI file, as generated by TEX82, into an IMP
file and sends it to the IMAGEN. This program differs from other commonly
used drivers in that it gets its font information from GF files rather
than from PXL files. This direct use of GF font information may set a
trend but it should be noted that many older but still useful fonts may
not be currently available in GF form.
The simplest way to invoke the program and to print the entire DVI file
is to type:
r dviesp;<dvi file name>
This will leave no trace of the IMP file after it has been printed.
The program may be called with switches (one letter per switch):
/f<integer>.....The lowest numbered page to be printed will
be that page in the file whose TeX counter,
count[0]), has a value equal to that typed.
The same conventions used by PLAIN TeX to
report page numbers (negative numbers for
Arabic) are to be used.
/n<integer>.....This number of pages, in the order of that
followed by TeX in producing them, will be
printed starting with the page defined by the
/f number or starting with the first page
that TeX processes if no /f value is typed.
Imagen will, of course, stack the pages in
the normal order (producing them in reverse).
/c<integer>.....The indicated number of copies will be printed.
This is currently not yet implemented.
Note: This is a simplified form of the more elaborate scheme that is
possible with TeX, being limited to that portion supported by PLAIN.
Examples:
r dviesp;foo............Prints the entire file `foo'.
r dviesp;foo/f43........Prints page 43 to the end of the file.
r dviesp;foo/n3.........Prints the first 3 pages only.
r dviesp;foo/f6/n3......Prints 3 pages starting with page 6.
r dviesp;foo/f-2/n3.....Prints 3 pages starting with page ii.
r dviesp;foo/f67/n1/c3..Prints 3 copies of page number 67.
If the command line does not contain the name of a dvi file, or if
the given name does not correspond to an accessible file, the program
will initiate a dialog with the user. During this dialog the user
can give the name of the input file and also the spec of the first page
and number of pages to print if they were not given in the command line.
Some \special commands in DVI files that DVIESP understands
DVIESP understands some extended commands that allow TeX to generate line
drawings of any desired degree of complexity, not, however, without some
trouble to the user.
At the present time, the following four special commands are honored with
all arguments expressed in decimal form, the dimensions in points and the
angles in positive or negative degrees.
\special{point <number>}
Remember the current position under the given index.
\special{join <pen size> <number1> <number2> .. <numberl>}
Draw straight line segments joining points <number1> and
<number2>, <number2> and <number3>,.., <number(l-1)> and
<numberl>.
\special{circle <pen size> <radius> <alpha0> <alpha1>}
Draw an arc of a circle between the two specified angles at the
specified radius.
\special{ellipse <pen size> <radius0> <radius1> <offset> <alpha0> <alpha1>
Draw a segment of an ellipse with the two specified radii at an
axial offset as given and between two points specified by two
generating angles as given.
Straight line figures
Figures composed of straight line segments are drawn by first assigning
numbers to a set of point locations on a page. Points are positioned by
issuing normal TeX commands (\raise, \kern, etc) to position TeX to the
desired locations on the page and by giving a \special(point <number>)
command when so positioned. One then gives one or more \special(joint <pen
size in pts> <number1> <number2> <number3 ... <number n>) commands that
will join these points (with straight line segments) in the order
specified (1 to 2, 2 to 3, etc.). For safety, all commands relating to any
one figure should be specificly constrained to be on a single page, for
example, by having them all within a single \hbox or \vbox.
While points are remembered across page boundries, no use can be made of
this feature, since DVIESP processs the pages in the reverse order to that
in which they are created by TeX. Points, once specified for use on the
same page, may be multiconnected by a series of \special(join) commands,
also allowing different pen sizes to be used for the different join
commands. As many as 256 different points, numbered 0 to 255, may be
specified. Most of the time, this number should be more than
adequate, unless it be to draw an elaborate curved-line figure by
generating a series of very short line segments. Drawings requiring more
than this number of points can always be produced by using a series of
join commands with the point numbers redefined between joins.
<pen size> gives the thickness of the line segments in points. Thus
\special{join .6 1 2} joins points 1 and 2 with a line of width .6pt, or
more precisely .6*65536 DVI units. If you use \magnification then of
course everything is enlarged by the magnification factor. The pen sizes
are translated and rounded into pixels and only pixel values of 0 to 20
are allowed. Requested numbers above the upper limit are reduced to 20
automatically. The use of a 0 width pen allows one to define an area that
could be filled with texturing, if and when texturing is implemented.
Circles and Arcs of Circles
Circles and arcs of circles are drawn by fiirst issuing normal TeX
commands (\raise, \kern, etc) to position the center at the desired
locations on the page and then by giving the circle command.
\special{circle <pen size> <radius> <alpha0> <alpha1>}.
The arc is drawn from alpha0 to alpha1 in a counterclockwise direction if
alpha1, as expressed, is numerically larger than than the expressed value
of alpha0, and in a clockwise direction otherwise. For example, alpha0
might be 15 and alpha1 could be either -15 or 365 to get either the
shorter arc through 0 or the longer arc through 180. This sounds
complicated, and an easy way to get the arc that you desire (except for
the 180 degree arc case) is to note that the angular length of the arc is
given by the magnitude of the numerical difference between the two
as-expressed arcs.
To draw a complete circle, the specified numerical values for the two
angles must differ by 360 degrees. Giving the same numerical value for
the two angles will produce a pen-sized dot at the specified point.
Ellipses and Arcs of ellipses.
Ellipses and arcs of ellipses are drawn by first issuing normal TeX
commands (\raise, \kern, etc) to position the center at the desired
locations on the page and then by giving the ellipse command,
\special{ellipse <pen size> <radius0> <radius1> <offset> <alpha0> <alpha1>.}
The two radii, are, respectively, along the x and y axes if the offset is
zero. The offset angle is measured counterclockwise.
The same rules apply to the
two alphas as noted for the circle case, except that these two angles are
now measured on the circle from which the ellipse is generated and the
actual angles on the resulting ellipse are altered from these values by
the generating process. While it is possible to do the necessary
translation to allow the specification to be in angles on the ellipse,
this was not done within the IMAGEN command language and it has not yet
been implemented in DVIESP.
DOVER feature that is not presently on the IMAGEN
The following \specials are partially implemented for the DOVER and are
being considered for the IMAGEN. It is thought that they would be of
limited utility and a more powerful set of commands (as permitted by the
IMAGEN) is being considered. In particular, it would be possible to
define an arbitrary textured pattern and to apply it to any singly
connected region. The writer (ALS) would be interested in an expression
of interest.
\special{rectangle <number1> <character> <number2> <number3>}
The four low order bits of <number1> describe the lower row
of a 4*4 square bit pattern. The next higher four bits
describe the third row from the top of that bit pattern.
The next four bits describe the second row, and the next higher
order four bits describe the top row. The bitmap given in
this way will be replicated to fill the rectangular area.
The <character> argument to "rectangle" gives the bit-painting
function that should be used in this operation. (Caution: Only
the `o' function is currently implemented on the DOVER (see below.)
0 Clear the rectangle.
1 Blacken the rectangle (the effect is the
same as that of a rule of the same dimensions).
s Replace the previous contents of the rectangle
by the new rectangle filled in with the pattern.
o Logical ``or'' the new rectangle on the previous
contents. (Same as overstriking one bitmap
with the other.)
x Logical ``xor'' the new rectangle on the previous contents.
a Logical ``and'' the two rectangles.
<number2> and <number3> are point indices for two opposite
corners of the rectangle.